<?php
namespace App\Controller;
use Think\Controller;
class LoginController extends Controller {
    public function index(){

    }
    public function checkLogin1(){
        //徐镜宁做的管理员登录8.24
        $admin=M('admins');
        $admin_name =$_GET['admin_name'];
        $password=$_GET['password'];
        if($admin->where("admin_name='$admin_name'and password='$password'")->select())
        {
            echo "{'info':true}";
        }else{
            echo "{'info':false}";
        }
    }
    

    public function checkLogin2(){
        //徐镜宁做的用户登录8.24
    	$user=M('users');
    	$telephone=$_GET['telephone'];
    	$password=$_GET['password'];
    	if($user->where("telephone='$telephone' and password='$password'")->select())
    	{
    		echo "{'info':true}";
    	}else{
    		echo "{'info':false}";
    	}
    }

     public function checkLogin3(){
        //薛烜做的教练登录8.24
        $user=M('coach');
        $coachname=$_GET['coachname'];
        $password=$_GET['password'];
        if($user->where("coachname='$coachname' and password='$password'")->select())
        {
            echo "{'info':true}";
        }else{
            echo "{'info':false}";
        }
    }
    
}